<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="net.sureon.dao.*"%>

<%
	List<DailyTimingStatistic> all = null;
	all = (List<DailyTimingStatistic>) request.getAttribute("all");
	String navBar = (String) request.getSession().getAttribute(net.sureon.common.SureonConstants.NAV_BAR_DISPLAY);
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>考勤统计</title>
	</head>
	<body>
		<jsp:include page="../header.jsp"></jsp:include>
		<div>
			<table cellpadding="0" cellspacing="0" class="style1">
				<tr>
					<td colspan="2">

						<table cellpadding="0" cellspacing="0" class="style5">
							<tr>
								<td style="text-align: left" bgcolor="#FFFBD6" class="style6">
									<table id="ctl00_ContentPlaceHolder1_Menu1"
										class="ctl00_ContentPlaceHolder1_Menu1_2" cellpadding="0"
										cellspacing="0" border="0">
										<tr>
											<td onmouseover="Menu_HoverStatic(this)"
												onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(this)"
												id="ctl00_ContentPlaceHolder1_Menu1n0">
												<table class="ctl00_ContentPlaceHolder1_Menu1_4"
													cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td style="white-space: nowrap;">
															<a
																	class="ctl00_ContentPlaceHolder1_Menu1_1 ctl00_ContentPlaceHolder1_Menu1_3"
																	href="<%=request.getContextPath() %>/user/myDailyTimingStatistic.do">我的考勤统计</a>
														</td>
													</tr>
												</table>
											</td>
											<td style="width: 3px;"></td>
											<td onmouseover="Menu_HoverStatic(this)"
												onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(this)"
												id="ctl00_ContentPlaceHolder1_Menu1n1">
												<table
													class="ctl00_ContentPlaceHolder1_Menu1_4 ctl00_ContentPlaceHolder1_Menu1_9"
													cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td style="white-space: nowrap;">
																<a
																	class="ctl00_ContentPlaceHolder1_Menu1_1 ctl00_ContentPlaceHolder1_Menu1_3"
																	href="<%=request.getContextPath() %>/user/underlingDailyTimingStatistic.do">下属考勤统计</a>
														</td>
													</tr>
												</table>
											</td>
											
				<%
					// 判断用户是否为GroupAdmin/CompanyAdmin
						if(net.sureon.common.SureonConstants.NAV_BAR_DISPLAY_ADMIN.equals(navBar)) {
				 %>
											<td style="width: 3px;"></td>
											<td onmouseover="Menu_HoverStatic(this)"
												onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(this)"
												id="ctl00_ContentPlaceHolder1_Menu1n0">
												<table class="ctl00_ContentPlaceHolder1_Menu1_4"
													cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td style="white-space: nowrap;">
															<a
																	class="ctl00_ContentPlaceHolder1_Menu1_1 ctl00_ContentPlaceHolder1_Menu1_3"
																	href="<%=request.getContextPath() %>/admin/adminDailyTimingStatistic.do">公司人员考勤统计</a>
														</td>
													</tr>
												</table>
											</td>
							<%
								}
							 %>

											<td width="100%" align="right">选择日期:</td>
											 <!--  根据条件查询考勤统计信息 -->
							 				<form action="<%=request.getContextPath() %>/admin/adminDailyTimingStatistic.do" method="post">
											
											<td style="width: 3px;"></td>
											<td>
												<input type="text" size="6" name="startDate" value="<%=request.getAttribute("strStartDate") %>" />
											</td>
											
											<td style="width: 3px;"></td>
											<td>
												<input type="text"  size="6" name="endDate" value="<%=request.getAttribute("strEndDate") %>" />
											</td>
											
											<td>
												<input type="submit" value="过滤" style=".style_buttton"/>
											</td>
											
											</form>
							 							 
							 
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td style="text-align: left">

									<table cellpadding="0" cellspacing="0" class="style5">
										<tr>
											<td style="text-align: left">
												<div>
													<table cellspacing="0" cellpadding="4" border="0"
														id="ctl00_ContentPlaceHolder1_GridView1"
														style="color: #333333; font-family: Arial; font-size: Small; width: 100%; border-collapse: collapse;">
														<tr align="center"
															style="color: White; background-color: #507CD1; font-weight: bold;">

															<th scope="col" style="color: White;">
																姓名
															</th>
															<th scope="col" style="color: White;">
																起始日期
															</th>
															<th scope="col" style="color: White;">
																终止日期
															</th>
															<th scope="col" style="color: White;">
																工作时间
															</th>
															<th scope="col" style="color: White;">
																加班时间
															</th>
															<th scope="col" style="color: White;">
																休假时间
															</th>
															<th scope="col" style="color: White;">
																请假时间
															</th>
														</tr>
														<%
															for (int i = 0; i < all.size(); i++) {
																DailyTimingStatistic dts = all.get(i);
														%>
														<tr align="center" style="background-color: #EFF3FB;">
															<td>
																<%=dts.getAuthor().getRealName() %>
															</td>
															<td>
																<%=dts.getStartDate()%>
															</td>
															<td>
																<%=dts.getEndDate()%>
															</td>
															<td>
																<%=dts.getTotalWorkTime()%>
															</td>
															<td>
																<%=dts.getTotalOverTime()%>
															</td>
															<td>
																<%=dts.getTotalvocationTime()%>
															</td>
															<td>
																<%=dts.getTotalLeaveTime()%>
															</td>
														</tr>
														<%
															}
														%>
													</table>
												</div>

											</td>
										</tr>
									</table>

								</td>
							</tr>
						</table>

					</td>
				</tr>
			</table>
		</div>
		<jsp:include page="../footer.jsp"></jsp:include>
	</body>
</html>
